package com.borko.healthcare.persistence.hibernate.services;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.borko.healthcare.entities.interfaces.Medicine;
import com.borko.healthcare.persistence.hibernate.dao.MedicineDAO;

@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public interface MedicineManager {
	
	public MedicineDAO getMedicineDAO();

	public void setMedicineDAO(MedicineDAO medicineDAO);

	@Transactional(readOnly = false)
	public void add(Medicine medicine);

	@Transactional(readOnly = false)
	public void applyChanges(Medicine medicine);

	public List<Medicine> list();

	@Transactional(readOnly = false)
	public void remove(Medicine medicine);
	
	@Transactional(readOnly = false)
	Medicine getMedicine(int id);

}
